<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="js/jquery-1.11.3.js"></script>
</head>
<script>
    var getParams = function(url) {
        if(url === undefined || typeof(url) != 'string'){
            return null;
        }
        items = url.split('?')[1].split('&');
        var json = {};
        for(var i=0; i< items.length;i++) {
            var item = items[i].split('=');
            alert(item[1]);
            json[item[0]] = item[1];
        }
       console.log(json);
    };
    var url=document.location.href;
    getParams(url);
</script>

<!--<script>-->
    <!--function getPar(par){-->
        <!--//获取当前URL-->
        <!--var local_url = document.location.href;-->
        <!--//获取要取得的get参数位置-->
        <!--var get = local_url.indexOf(par +"=");-->
        <!--if(get == -1){-->
            <!--return false;-->
        <!--}-->
        <!--//截取字符串-->
        <!--var get_par = local_url.slice(par.length + get + 1);-->
        <!--//判断截取后的字符串是否还有其他get参数-->
        <!--var nextPar = get_par.indexOf("&");-->
        <!--if(nextPar != -1){-->
            <!--get_par = get_par.slice(0, nextPar);-->
        <!--}-->
        <!--return get_par;-->
    <!--}-->
<!--</script>-->
<body>
<a href="1.html" id="haha">跳到5555551</a>
</body>
</html>